package com.guo.hui.rabbitmq;

import javax.annotation.Resource;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

//@Component
public class ConsumerMq {

//	@Resource
//	private RabbitTemplate rabbitTemplate;
//
//	public void rmqProducerMessage(Object object) {
//
//		RabbitMessage rabbitMessage = (RabbitMessage) object;
//		System.out.println("消费者:");
//		System.out.println(rabbitTemplate.receive("testQueue").toString());
//		System.out.println(rabbitTemplate.receiveAndConvert("testQueue").toString());
//
//	}

	// public static void main(String[] args) {
	// ApplicationContext context = new
	// ClassPathXmlApplicationContext("spring-mvc.xml");
	// AmqpTemplate amqpTemplate = context.getBean(RabbitTemplate.class);
	// System.out.println("Received: " + amqpTemplate.receiveAndConvert());
	// }

}
